<?php
function supplier_type()
{

}

//菜单类型
function menu_type($v = "")
{
    $arr = ["早餐", "中餐", "晚餐", "中餐补餐", "晚餐补餐"];
    return isset($arr[$v]) ? $arr[$v] : (count(func_get_args()) == 0 ? $arr : '');
}

function order_deliver_status()
{
    return [
        12 => "待出餐",
        16 => "待分拣",
        17 => "待配送",
        20 => "已送达",
        80 => "已取消",
    ];
}

/**
 * 优惠券类型
 * @param $v
 */
function coupon_type($v = "")
{

    $arr = [
        1 => "平台券",
        2 => "店铺券",
    ];

    return isset($arr[$v]) ? $arr[$v] : (count(func_get_args()) == 0 ? $arr : '');
}

function order_filter_status($v = "")
{
    $arr = [
        1 => "待付款",
        11 => "待接单",
        12 => "待出餐",
        16 => "待分拣",
        17 => "待配送",
        20 => "已送达",
        60 => "已退款",
        80 => "已取消",
    ];

    return isset($arr[$v]) ? $arr[$v] : (count(func_get_args()) == 0 ? $arr : '');
}


/**
 * 用户标签
 * @param string $v
 * @return string|string[]
 */
function member_tag($v = "")
{
    $arr = [
        1 => "中南病人",
        2 => "中南职工",
        6 => "中南游客",
        5 => "中南其他",

    ];

    return isset($arr[$v]) ? $arr[$v] : (count(func_get_args()) == 0 ? $arr : '');
}

//配送时间段
function deliver_timeList1($v = '')
{
    $arr = [
        /*  3 => "0:01-4:00",
          6 => "4:01-8:00",
          9 => "8:01-12:00",
          12 => "12:01-16:00",
          15 => "16:00-20:00",
          18 => "20:01-0:00",*/
        2 => '7:30-8:00',
        3 => '8:30-9:00',
        4 => '10:30-11:00',
        5 => '11:30-12:00',
        7 => "12:30-13:00",
        8 => "13:30-14:00",
        9 => "16:30-17:00",
        10 => "17:30-18:00",
        11 => "18:30-19:00",
        14 => "19:30-20:00"
    ];

    return strlen($v) > 0 ? $arr[$v] : $arr;
}